function queryAllMovieListByType(type){
    const promise = new Promise((resolve, reject) => {
        $.ajax({
            url: baseUrl + 'movie/catalog/'+type,
            type: 'GET',
            dataType: 'json',
            success: resp => {
                resolve(resp);

            },
            error: err => {
                reject(err);
            }
        })
    })
    return promise;
}


function queryMoviePagerByType(type,currentPageNumber){
    const promise = new Promise((resolve, reject) => {
        $.ajax({
            url: baseUrl + 'movie/catalog/pager/'+type+'?currentPageNumber='+currentPageNumber,
            type: 'GET',
            dataType: 'json',
            success: resp => {
                resolve(resp);

            },
            error: err => {
                reject(err);
            }
        })
    })
    return promise;
}

function elasticSearchMoviesByKeyword(keyword,currentPageNumber){
    const promise = new Promise((resolve, reject) => {
        $.ajax({
            url: baseUrl + 'movie/elasticsearch/'+keyword+'/'+currentPageNumber,
            type: 'GET',
            dataType: 'json',
            success: resp => {
                resolve(resp);

            },
            error: err => {
                reject(err);
            }
        })
    })
    return promise;
}